Skip to content

declare own Dispatch and Store interfaces #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

unstubbable
Copy link

The current implementation of the typings makes it impossible
to create a middleware that only handles standard actions. This means
a middleware must handle thunked actions even though it never actually
handles them during runtime. (see issue and examples in #82)

By declaring the Dispatch and Store interfaces again instead of
overloading the original implementation of redux a consumer of
redux-thunk can choose the right implementation for his use case
(e.g. ActionCreator vs. Middleware).

fixes #82

The current implementation of the typings makes it impossible
to create a middleware that only handles standard actions. This means
a middleware must handle thunked actions even though it never actually
handles them during runtime. (see issue and examples in reduxjs#82)

By declaring the Dispatch and Store interfaces again instead of
overloading the original implementation of redux a consumer of
redux-thunk can choose the right implementation for his use case
(e.g. ActionCreator vs. Middleware).

fixes reduxjs#82
@unstubbable unstubbable force-pushed the fix-typescript-declarations branch from 3178815 to 69ad11b Compare September 11, 2017 10:31
@timdorr
Copy link
Member

timdorr commented May 25, 2018

This has been superseded by some other updates to the typings. If you want to revisit this, I can reopen it for you.

@timdorr timdorr closed this May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript Error in Middleware
2 participants